package lily.phs.child;


import lily.phs.object.OneChild;
import lily.phs.urh.R;
import lily.ui.control.MyPopupWindow;



import android.content.Context;
import android.graphics.Canvas;
import android.graphics.Color;
import android.graphics.Paint;
import android.text.InputType;
import android.view.Gravity;
import android.view.LayoutInflater;
import android.view.View;

import android.view.View.OnClickListener;
import android.view.View.OnFocusChangeListener;
import android.view.WindowManager.LayoutParams;
import android.widget.Button;
import android.widget.CheckBox;
import android.widget.EditText;
import android.widget.FrameLayout;
import android.widget.LinearLayout;
import android.widget.RadioButton;
import android.widget.RadioGroup;
import android.widget.RelativeLayout;
import android.widget.ScrollView;

/**
 * @author chen
 *该类用于显示和保存“1岁以内儿童健康检查记录表”中后半部分内容
 */
public class SmallOneChildView_Two extends RelativeLayout implements OnFocusChangeListener,OnClickListener{
	View v;
	Paint paint;
	private int profileid;
	private LinearLayout ll1;
	private Context myContext;
	MyPopupWindow mPopupWindow;
	//ScrollView sv;
	private RadioButton rb_gm_no_1,rb_gm_no_2,rb_gm_no_3,rb_gm_no_4,rb_gm_yes_1,rb_gm_yes_2,rb_gm_yes_3,rb_gm_yes_4,
						rb_fypg_pass_1,rb_fypg_pass_2,rb_fypg_pass_3,rb_fypg_pass_4,rb_fypg_nopass_1,rb_fypg_nopass_2,rb_fypg_nopass_3,rb_fypg_nopass_4,
						rb_disease_no_1,rb_disease_no_2,rb_disease_no_3,rb_disease_no_4,rb_disease_yes_1,rb_disease_yes_2,rb_disease_yes_3,rb_disease_yes_4,
						rb_zz_no_1,rb_zz_no_2,rb_zz_no_3,rb_zz_no_4,rb_zz_yes_1,rb_zz_yes_2,rb_zz_yes_3,rb_zz_yes_4;
	private CheckBox rb_kyllbzz_no_4,rb_kyllbzz_no_2,rb_kyllbzz_no_3,rb_kyllbzz_yejing_2,rb_kyllbzz_yejing_3,rb_kyllbzz_yejing_4,
						rb_kyllbzz_duohan_2,rb_kyllbzz_duohan_3,rb_kyllbzz_duohan_4,rb_kyllbzz_fanzao_2,rb_kyllbzz_fanzao_3,rb_kyllbzz_fanzao_4,
						rb_kyllbtz_no_1,rb_kyllbtz_no_2,rb_kyllbtz_lgrh_1,rb_kyllbtz_lgrh_2,rb_kyllbtz_fl_1,rb_kyllbtz_fl_2,rb_kyllbtz_zt_1,rb_kyllbtz_zt_2,
						cb_kyglbtz_lcz_3,cb_kyglbtz_lcz_4,cb_kyglbtz_lwf_3,cb_kyglbtz_lwf_4,cb_kyglbtz_lrgg_3,cb_kyglbtz_lrgg_4,cb_kyglbtz_jx_3,cb_kyglbtz_jx_4,cb_kyglbtz_szz_3,cb_kyglbtz_szz_4,
						cb_guide_1_1,cb_guide_1_2,cb_guide_1_3,cb_guide_1_4,
						cb_guide_2_1,cb_guide_2_2,cb_guide_2_3,cb_guide_2_4,
						cb_guide_3_1,cb_guide_3_2,cb_guide_3_3,cb_guide_3_4,
						cb_guide_4_1,cb_guide_4_2,cb_guide_4_3,cb_guide_4_4,
						cb_guide_5_1,cb_guide_5_2,cb_guide_5_3,cb_guide_5_4;
	private EditText et_xhdb_1,et_xhdb_2,et_xhdb_3,et_xhdb_4,
					 et_hwhd_1,et_hwhd_2,et_hwhd_3,et_hwhd_4,
					 et_vd_1,et_vd_2,et_vd_3,et_vd_4,
					 et_other_1,et_other_2,et_other_3,et_other_4,
					 et_zz_reason_1,et_zz_reason_2,et_zz_reason_3,et_zz_reason_4,
					 et_zz_inst_1,et_zz_inst_2,et_zz_inst_3,et_zz_inst_4,
					 et_nextdate_1,et_nextdate_2,et_nextdate_3,et_nextdate_4,
					 et_doctor_1,et_doctor_2,et_doctor_3,et_doctor_4,et;
	
	private RadioGroup rg_gm_1,rg_gm_2,rg_gm_3,rg_gm_4,
					   rg_fypg_1,rg_fypg_2,rg_fypg_3,rg_fypg_4,
					   rg_disease_1,rg_disease_2,rg_disease_3,rg_disease_4,
					   rg_zz_1,rg_zz_2,rg_zz_3,rg_zz_4;
	
	OneChild oc1,oc2,oc3,oc4;
	
	public SmallOneChildView_Two(Context context,int pro) {
		super(context);
		myContext=context;
		this.profileid=pro;
		paint=new Paint();
		paint.setStyle(Paint.Style.STROKE);
        paint.setColor(Color.BLACK);
	}
	
	/**
	 * 该函数用于使本类中定义的控件与布局文件中的控件相对应
	 */
	public void findWeidget(){
		LayoutInflater factory = LayoutInflater.from(myContext);
        v = factory.inflate(R.layout.smallone_child_2, null);
        et=(EditText)v.findViewById(R.id.et_sc_xhdb_dffd2);
        et.setInputType(InputType.TYPE_NULL);
        
        ll1=(LinearLayout)v.findViewById(R.id.ll);
        rb_kyllbzz_no_2=(CheckBox)v.findViewById(R.id.rb_sc_kyglbzz_no_2);
        rb_kyllbzz_no_3=(CheckBox)v.findViewById(R.id.rb_sc_kyglbzz_no_3);
        rb_kyllbzz_no_4=(CheckBox)v.findViewById(R.id.rb_sc_kyglbzz_no_4);
        rb_kyllbzz_yejing_2=(CheckBox)v.findViewById(R.id.rb_sc_kyglbzz_yejing_2);
        rb_kyllbzz_yejing_3=(CheckBox)v.findViewById(R.id.rb_sc_kyglbzz_yejing_3);
        rb_kyllbzz_yejing_4=(CheckBox)v.findViewById(R.id.rb_sc_kyglbzz_yejing_4);
        rb_kyllbzz_duohan_2=(CheckBox)v.findViewById(R.id.rb_sc_kyglbzz_duohan_2);
        rb_kyllbzz_duohan_3=(CheckBox)v.findViewById(R.id.rb_sc_kyglbzz_duohan_3);
        rb_kyllbzz_duohan_4=(CheckBox)v.findViewById(R.id.rb_sc_kyglbzz_duohan_4);
        rb_kyllbzz_fanzao_2=(CheckBox)v.findViewById(R.id.rb_sc_kyglbzz_fanzao_2);
        rb_kyllbzz_fanzao_3=(CheckBox)v.findViewById(R.id.rb_sc_kyglbzz_fanzao_3);
        rb_kyllbzz_fanzao_4=(CheckBox)v.findViewById(R.id.rb_sc_kyglbzz_fanzao_4);
        rb_kyllbtz_no_1=(CheckBox)v.findViewById(R.id.rb_sc_kyllbtz_no_1);
        rb_kyllbtz_no_1.requestFocus();
        rb_kyllbtz_no_2=(CheckBox)v.findViewById(R.id.rb_sc_kyllbtz_no_2);
        rb_kyllbtz_lgrh_1=(CheckBox)v.findViewById(R.id.rb_sc_kyllbtz_lgrh_1);
        rb_kyllbtz_lgrh_2=(CheckBox)v.findViewById(R.id.rb_sc_kyllbtz_lgrh_2);
        rb_kyllbtz_fl_1=(CheckBox)v.findViewById(R.id.rb_sc_kyllbtz_fl_1);
        rb_kyllbtz_fl_2=(CheckBox)v.findViewById(R.id.rb_sc_kyllbtz_fl_2);
        rb_kyllbtz_zt_1=(CheckBox)v.findViewById(R.id.rb_sc_kyllbtz_zt_1);
        rb_kyllbtz_zt_2=(CheckBox)v.findViewById(R.id.rb_sc_kyllbtz_zt_2);
        cb_kyglbtz_lcz_3=(CheckBox)v.findViewById(R.id.cb_sc_kyglbtz_lcz_3);
        cb_kyglbtz_lcz_4=(CheckBox)v.findViewById(R.id.cb_sc_kyglbtz_lcz_4);
        cb_kyglbtz_lwf_3=(CheckBox)v.findViewById(R.id.cb_sc_kyglbtz_lwf_3);
        cb_kyglbtz_lwf_4=(CheckBox)v.findViewById(R.id.cb_sc_kyglbtz_lwf_4);
        cb_kyglbtz_lrgg_3=(CheckBox)v.findViewById(R.id.cb_sc_kyglbtz_lrgg_3);
        cb_kyglbtz_lrgg_4=(CheckBox)v.findViewById(R.id.cb_sc_kyglbtz_lrgg_4);
        cb_kyglbtz_jx_3=(CheckBox)v.findViewById(R.id.cb_sc_kyglbtz_jx_3);
        cb_kyglbtz_jx_4=(CheckBox)v.findViewById(R.id.cb_sc_kyglbtz_jx_4);
        cb_kyglbtz_szz_3=(CheckBox)v.findViewById(R.id.cb_sc_kyglbtz_szz_3);
        cb_kyglbtz_szz_4=(CheckBox)v.findViewById(R.id.cb_sc_kyglbtz_szz_4);
        rg_gm_1=(RadioGroup)v.findViewById(R.id.rg_sc_gm_1);
        rg_gm_2=(RadioGroup)v.findViewById(R.id.rg_sc_gm_2);
        rg_gm_3=(RadioGroup)v.findViewById(R.id.rg_sc_gm_3);
        rg_gm_4=(RadioGroup)v.findViewById(R.id.rg_sc_gm_4);
        rb_gm_no_1=(RadioButton)v.findViewById(R.id.rb_sc_gm_no_1);
        rb_gm_no_2=(RadioButton)v.findViewById(R.id.rb_sc_gm_no_2);
        rb_gm_no_3=(RadioButton)v.findViewById(R.id.rb_sc_gm_no_3);
        rb_gm_no_4=(RadioButton)v.findViewById(R.id.rb_sc_gm_no_4);
        rb_gm_yes_1=(RadioButton)v.findViewById(R.id.rb_sc_gm_yes_1);
        rb_gm_yes_2=(RadioButton)v.findViewById(R.id.rb_sc_gm_yes_2);
        rb_gm_yes_3=(RadioButton)v.findViewById(R.id.rb_sc_gm_yes_3);
        rb_gm_yes_4=(RadioButton)v.findViewById(R.id.rb_sc_gm_yes_4);
		et_xhdb_2=(EditText)v.findViewById(R.id.et_sc_xhdb_2);
		et_xhdb_4=(EditText)v.findViewById(R.id.et_sc_xhdb_4);
		et_xhdb_1=(EditText)v.findViewById(R.id.et_sc_xhdb_1);
		et_xhdb_3=(EditText)v.findViewById(R.id.et_sc_xhdb_3);
		et_hwhd_1=(EditText)v.findViewById(R.id.et_sc_hwhd_1);
		et_hwhd_2=(EditText)v.findViewById(R.id.et_sc_hwhd_2);
		et_hwhd_3=(EditText)v.findViewById(R.id.et_sc_hwhd_3);
		et_hwhd_4=(EditText)v.findViewById(R.id.et_sc_hwhd_4);
		et_vd_1=(EditText)v.findViewById(R.id.et_sc_vd_1);
		et_vd_2=(EditText)v.findViewById(R.id.et_sc_vd_2);
		et_vd_3=(EditText)v.findViewById(R.id.et_sc_vd_3);
		et_vd_4=(EditText)v.findViewById(R.id.et_sc_vd_4);
		rg_fypg_1=(RadioGroup)v.findViewById(R.id.rg_sc_fypg_1);
		rg_fypg_2=(RadioGroup)v.findViewById(R.id.rg_sc_fypg_2);
		rg_fypg_3=(RadioGroup)v.findViewById(R.id.rg_sc_fypg_3);
		rg_fypg_4=(RadioGroup)v.findViewById(R.id.rg_sc_fypg_4);
		rb_fypg_pass_1=(RadioButton)v.findViewById(R.id.rb_sc_fypg_pass_1);
		rb_fypg_pass_2=(RadioButton)v.findViewById(R.id.rb_sc_fypg_pass_2);
		rb_fypg_pass_3=(RadioButton)v.findViewById(R.id.rb_sc_fypg_pass_3);
		rb_fypg_pass_4=(RadioButton)v.findViewById(R.id.rb_sc_fypg_pass_4);
		rb_fypg_nopass_1=(RadioButton)v.findViewById(R.id.rb_sc_fypg_nopass_1);
		rb_fypg_nopass_2=(RadioButton)v.findViewById(R.id.rb_sc_fypg_nopass_2);
		rb_fypg_nopass_3=(RadioButton)v.findViewById(R.id.rb_sc_fypg_nopass_3);
		rb_fypg_nopass_4=(RadioButton)v.findViewById(R.id.rb_sc_fypg_nopass_4);
		rg_disease_1=(RadioGroup)v.findViewById(R.id.rg_sc_disease_1);
		rg_disease_2=(RadioGroup)v.findViewById(R.id.rg_sc_disease_2);
		rg_disease_3=(RadioGroup)v.findViewById(R.id.rg_sc_disease_3);
		rg_disease_4=(RadioGroup)v.findViewById(R.id.rg_sc_disease_4);
		rb_disease_no_1=(RadioButton)v.findViewById(R.id.rb_sc_disease_no_1);
		rb_disease_no_2=(RadioButton)v.findViewById(R.id.rb_sc_disease_no_2);
		rb_disease_no_3=(RadioButton)v.findViewById(R.id.rb_sc_disease_no_3);
		rb_disease_no_4=(RadioButton)v.findViewById(R.id.rb_sc_disease_no_4);
		rb_disease_yes_1=(RadioButton)v.findViewById(R.id.rb_sc_disease_yes_1);
		rb_disease_yes_2=(RadioButton)v.findViewById(R.id.rb_sc_disease_yes_2);
		rb_disease_yes_3=(RadioButton)v.findViewById(R.id.rb_sc_disease_yes_3);
		rb_disease_yes_4=(RadioButton)v.findViewById(R.id.rb_sc_disease_yes_4);
		et_other_1=(EditText)v.findViewById(R.id.et_sc_other_1);
		et_other_2=(EditText)v.findViewById(R.id.et_sc_other_2);
		et_other_3=(EditText)v.findViewById(R.id.et_sc_other_3);
		et_other_4=(EditText)v.findViewById(R.id.et_sc_other_4);
		rg_zz_1=(RadioGroup)v.findViewById(R.id.rg_sc_zz_1);
		rg_zz_2=(RadioGroup)v.findViewById(R.id.rg_sc_zz_2);
		rg_zz_3=(RadioGroup)v.findViewById(R.id.rg_sc_zz_3);
		rg_zz_4=(RadioGroup)v.findViewById(R.id.rg_sc_zz_4);
		rb_zz_no_1=(RadioButton)v.findViewById(R.id.rb_sc_zz_no_1);
		rb_zz_no_2=(RadioButton)v.findViewById(R.id.rb_sc_zz_no_2);
		rb_zz_no_3=(RadioButton)v.findViewById(R.id.rb_sc_zz_no_3);
		rb_zz_no_4=(RadioButton)v.findViewById(R.id.rb_sc_zz_no_4);
		rb_zz_yes_1=(RadioButton)v.findViewById(R.id.rb_sc_zz_yes_1);
		rb_zz_yes_2=(RadioButton)v.findViewById(R.id.rb_sc_zz_yes_2);
		rb_zz_yes_3=(RadioButton)v.findViewById(R.id.rb_sc_zz_yes_3);
		rb_zz_yes_4=(RadioButton)v.findViewById(R.id.rb_sc_zz_yes_4);
		et_zz_reason_1=(EditText)v.findViewById(R.id.et_sc_zz_reason_1);
		et_zz_reason_2=(EditText)v.findViewById(R.id.et_sc_zz_reason_2);
		et_zz_reason_3=(EditText)v.findViewById(R.id.et_sc_zz_reason_3);
		et_zz_reason_4=(EditText)v.findViewById(R.id.et_sc_zz_reason_4);
		et_zz_inst_1=(EditText)v.findViewById(R.id.et_sc_zz_inst_1);
		et_zz_inst_2=(EditText)v.findViewById(R.id.et_sc_zz_inst_2);
		et_zz_inst_3=(EditText)v.findViewById(R.id.et_sc_zz_inst_3);
		et_zz_inst_4=(EditText)v.findViewById(R.id.et_sc_zz_inst_4);
		cb_guide_1_1=(CheckBox)v.findViewById(R.id.cb_sc_guide_1_1);
		cb_guide_1_2=(CheckBox)v.findViewById(R.id.cb_sc_guide_1_2);
		cb_guide_1_3=(CheckBox)v.findViewById(R.id.cb_sc_guide_1_3);
		cb_guide_1_4=(CheckBox)v.findViewById(R.id.cb_sc_guide_1_4);
		cb_guide_2_1=(CheckBox)v.findViewById(R.id.cb_sc_guide_2_1);
		cb_guide_2_2=(CheckBox)v.findViewById(R.id.cb_sc_guide_2_2);
		cb_guide_2_3=(CheckBox)v.findViewById(R.id.cb_sc_guide_2_3);
		cb_guide_2_4=(CheckBox)v.findViewById(R.id.cb_sc_guide_2_4);
		cb_guide_3_1=(CheckBox)v.findViewById(R.id.cb_sc_guide_3_1);
		cb_guide_3_2=(CheckBox)v.findViewById(R.id.cb_sc_guide_3_2);
		cb_guide_3_3=(CheckBox)v.findViewById(R.id.cb_sc_guide_3_3);
		cb_guide_3_4=(CheckBox)v.findViewById(R.id.cb_sc_guide_3_4);
		cb_guide_4_1=(CheckBox)v.findViewById(R.id.cb_sc_guide_4_1);
		cb_guide_4_2=(CheckBox)v.findViewById(R.id.cb_sc_guide_4_2);
		cb_guide_4_3=(CheckBox)v.findViewById(R.id.cb_sc_guide_4_3);
		cb_guide_4_4=(CheckBox)v.findViewById(R.id.cb_sc_guide_4_4);
		cb_guide_5_1=(CheckBox)v.findViewById(R.id.cb_sc_guide_5_1);
		cb_guide_5_2=(CheckBox)v.findViewById(R.id.cb_sc_guide_5_2);
		cb_guide_5_3=(CheckBox)v.findViewById(R.id.cb_sc_guide_5_3);
		cb_guide_5_4=(CheckBox)v.findViewById(R.id.cb_sc_guide_5_4);
		et_nextdate_1=(EditText)v.findViewById(R.id.et_sc_nextdate_1);
		et_nextdate_2=(EditText)v.findViewById(R.id.et_sc_nextdate_2);
		et_nextdate_3=(EditText)v.findViewById(R.id.et_sc_nextdate_3);
		et_nextdate_4=(EditText)v.findViewById(R.id.et_sc_nextdate_4);
		et_nextdate_1.setInputType(InputType.TYPE_NULL);
		et_nextdate_2.setInputType(InputType.TYPE_NULL);
		et_nextdate_3.setInputType(InputType.TYPE_NULL);
		et_nextdate_4.setInputType(InputType.TYPE_NULL);
		et_nextdate_1.setOnClickListener(this);
		et_nextdate_1.setOnFocusChangeListener(this);
		et_nextdate_2.setOnClickListener(this);
		et_nextdate_2.setOnFocusChangeListener(this);
		et_nextdate_3.setOnClickListener(this);
		et_nextdate_3.setOnFocusChangeListener(this);
		et_nextdate_4.setOnClickListener(this);
		et_nextdate_4.setOnFocusChangeListener(this);
		et_doctor_1=(EditText)v.findViewById(R.id.et_sc_doctor_1);
		et_doctor_2=(EditText)v.findViewById(R.id.et_sc_doctor_2);
		et_doctor_3=(EditText)v.findViewById(R.id.et_sc_doctor_3);
		et_doctor_4=(EditText)v.findViewById(R.id.et_sc_doctor_4);
		oc1=new OneChild(myContext);
		oc1.selectOneChild(profileid, 1);
		oc2=new OneChild(myContext);
		oc2.selectOneChild(profileid, 2);
		oc3=new OneChild(myContext);
		oc3.selectOneChild(profileid, 3);
		oc4=new OneChild(myContext);
		oc4.selectOneChild(profileid, 4);
	}
	
	public void selectData(){
		oc1.selectOneChild(profileid, 1);
		oc2.selectOneChild(profileid, 2);
		oc3.selectOneChild(profileid, 3);
		oc4.selectOneChild(profileid, 4);
	}
	
	/**
	 * 将定义的视图v添加到该类对应的视图中
	 */
	public void addToView(){
		LayoutParams lp=new LayoutParams(LayoutParams.FILL_PARENT,LayoutParams.FILL_PARENT);
		
		this.addView(v,lp);
		
		MyView mv=new MyView(myContext);
		this.addView(mv,lp);
	}
	
	/**
	 * 根据从数据库中取得的数据来初始化各个控件的值
	 */
	public void initView()
	{
		if(oc1.getOnch_stoop_sign()!=null&&oc1.getOnch_stoop_sign().length()>0){
			String s[]=oc1.getOnch_stoop_sign().split(",");
			for(int i=0;i<s.length;i++){
				switch(Integer.parseInt(s[i])){
				case 1:
					rb_kyllbtz_no_1.setChecked(true);
					break;
				case 2:
					rb_kyllbtz_lgrh_1.setChecked(true);
					break;
				case 3:
					rb_kyllbtz_fl_1.setChecked(true);
					break;
				case 4:
					rb_kyllbtz_zt_1.setChecked(true);
					break;
				}
			}
		}
		if(oc1.getOnch_anus()>0){
			switch(oc2.getOnch_anus()){
			case 1:
				rg_gm_1.check(0);
				rb_gm_no_1.setChecked(true);
				break;
			case 2:
				rg_gm_1.check(1);
				rb_gm_yes_1.setChecked(true);
				break;
			}
		}
		if(oc1.getOnch_sanguine()>0){
			et_xhdb_1.setText(oc1.getOnch_sanguine()+"");
		}
		if(oc1.getOnch_activity()>0){
			et_hwhd_1.setText(oc1.getOnch_activity()+"");
		}
		if(oc1.getOnch_vd()>0){
			et_vd_1.setText(oc1.getOnch_vd()+"");
		}
		if(oc1.getOnch_deve_asse()>0){
			switch(oc1.getOnch_deve_asse()){
			case 1:
				rg_fypg_1.check(0);
				rb_fypg_pass_1.setChecked(true);
				break;
			case 2:
				rg_fypg_1.check(1);
				rb_fypg_nopass_1.setChecked(true);
				break;
			}
		}
		if(oc1.getOnch_deases()>0){
			switch(oc1.getOnch_deases()){
			case 1:
				rg_disease_1.check(0);
				rb_disease_no_1.setChecked(true);
				break;
			case 2:
				rg_disease_1.check(1);
				rb_disease_yes_1.setChecked(true);
				break;
			}
		}
		et_other_1.setText(oc1.getOnch_other());
		if(oc1.getOnch_refe_choi()>0){
			switch(oc1.getOnch_refe_choi()){
			case 1:
				rg_zz_1.check(0);
				rb_zz_no_1.setChecked(true);
				break;
			case 2:
				rg_zz_1.check(1);
				rb_zz_yes_1.setChecked(true);
				et_zz_reason_1.setText(oc1.getOnch_refe_reasion());
				et_zz_inst_1.setText(oc1.getOnch_refe_inst());
				break;
			}
		}
		if(oc1.getOnch_guide()!=null&&oc1.getOnch_guide().length()>0){
			String s[]=oc1.getOnch_guide().split(",");
			for(int i=0;i<s.length;i++){
				switch(Integer.parseInt(s[i])){
				case 1:
					cb_guide_1_1.setChecked(true);
					break;
				case 2:
					cb_guide_2_1.setChecked(true);
					break;
				case 3:
					cb_guide_3_1.setChecked(true);
					break;
				case 4:
					cb_guide_4_1.setChecked(true);
					break;
				case 5:
					cb_guide_5_1.setChecked(true);
					break;
				}
			}
		}
		et_nextdate_1.setText(oc1.getOnch_next_date());
		et_doctor_1.setText(oc1.getOnch_doctor());
		//3月龄
		//oc.selectOneChild(profileid, 2);
		if(oc2.getOnch_stoop_symp()!=null&&oc2.getOnch_stoop_symp().length()>0){
			String s[]=oc2.getOnch_stoop_symp().split(",");
			for(int i=0;i<s.length;i++){
				switch(Integer.parseInt(s[i])){
				case 1:
					rb_kyllbzz_no_2.setChecked(true);
					break;
				case 2:
					rb_kyllbzz_yejing_2.setChecked(true);
					break;
				case 3:
					rb_kyllbzz_duohan_2.setChecked(true);
					break;
				case 4:
					rb_kyllbzz_fanzao_2.setChecked(true);
					break;
				}
			}
		}
		if(oc2.getOnch_stoop_sign()!=null&&oc2.getOnch_stoop_sign().length()>0){
			String s[]=oc2.getOnch_stoop_sign().split(",");
			for(int i=0;i<s.length;i++){
				switch(Integer.parseInt(s[i])){
				case 1:
					rb_kyllbtz_no_2.setChecked(true);
					break;
				case 2:
					rb_kyllbtz_lgrh_2.setChecked(true);
					break;
				case 3:
					rb_kyllbtz_fl_2.setChecked(true);
					break;
				case 4:
					rb_kyllbtz_zt_2.setChecked(true);
					break;
				}
			}
		}
		if(oc2.getOnch_anus()>0){
			switch(oc2.getOnch_anus()){
			case 1:
				rg_gm_2.check(0);
				rb_gm_no_2.setChecked(true);
				break;
			case 2:
				rg_gm_2.check(1);
				rb_gm_yes_2.setChecked(true);
				break;
			}
		}
		if(oc2.getOnch_sanguine()>0){
			et_xhdb_2.setText(oc2.getOnch_sanguine()+"");
		}
		if(oc2.getOnch_activity()>0){
			et_hwhd_2.setText(oc2.getOnch_activity()+"");
		}
		if(oc2.getOnch_vd()>0){
			et_vd_2.setText(oc2.getOnch_vd()+"");
		}
		if(oc2.getOnch_deve_asse()>0){
			switch(oc2.getOnch_deve_asse()){
			case 1:
				rg_fypg_2.check(0);
				rb_fypg_pass_2.setChecked(true);
				break;
			case 2:
				rg_fypg_2.check(1);
				rb_fypg_nopass_2.setChecked(true);
				break;
			}
		}
		if(oc2.getOnch_deases()>0){
			switch(oc2.getOnch_deases()){
			case 1:
				rg_disease_2.check(0);
				rb_disease_no_2.setChecked(true);
				break;
			case 2:
				rg_disease_2.check(1);
				rb_disease_yes_2.setChecked(true);
				break;
			}
		}
		et_other_2.setText(oc2.getOnch_other());
		if(oc2.getOnch_refe_choi()>0){
			switch(oc2.getOnch_refe_choi()){
			case 1:
				rg_zz_2.check(0);
				rb_zz_no_2.setChecked(true);
				break;
			case 2:
				rg_zz_2.check(1);
				rb_zz_yes_2.setChecked(true);
				et_zz_reason_2.setText(oc2.getOnch_refe_reasion());
				et_zz_inst_2.setText(oc2.getOnch_refe_inst());
				break;
			}
		}
		if(oc2.getOnch_guide()!=null&&oc2.getOnch_guide().length()>0){
			String s[]=oc2.getOnch_guide().split(",");
			for(int i=0;i<s.length;i++){
				switch(Integer.parseInt(s[i])){
				case 1:
					cb_guide_1_2.setChecked(true);
					break;
				case 2:
					cb_guide_2_2.setChecked(true);
					break;
				case 3:
					cb_guide_3_2.setChecked(true);
					break;
				case 4:
					cb_guide_4_2.setChecked(true);
					break;
				case 5:
					cb_guide_5_2.setChecked(true);
					break;
				}
			}
		}
		et_nextdate_2.setText(oc2.getOnch_next_date());
		et_doctor_2.setText(oc2.getOnch_doctor());
		//6月龄
		//oc.selectOneChild(profileid, 3);
		if(oc3.getOnch_stoop_symp()!=null&&oc3.getOnch_stoop_symp().length()>0){
			String s[]=oc3.getOnch_stoop_symp().split(",");
			for(int i=0;i<s.length;i++){
				switch(Integer.parseInt(s[i])){
				case 1:
					rb_kyllbzz_no_3.setChecked(true);
					break;
				case 2:
					rb_kyllbzz_yejing_3.setChecked(true);
					break;
				case 3:
					rb_kyllbzz_duohan_3.setChecked(true);
					break;
				case 4:
					rb_kyllbzz_fanzao_3.setChecked(true);
					break;
				}
			}
		}
		if(oc3.getOnch_stoop_sign()!=null&&oc3.getOnch_stoop_sign().length()>0){
			String s[]=oc3.getOnch_stoop_sign().split(",");
			for(int i=0;i<s.length;i++){
				switch(Integer.parseInt(s[i])){
				case 1:
					cb_kyglbtz_lcz_3.setChecked(true);
					break;
				case 2:
					cb_kyglbtz_lwf_3.setChecked(true);
					break;
				case 3:
					cb_kyglbtz_lrgg_3.setChecked(true);
					break;
				case 4:
					cb_kyglbtz_jx_3.setChecked(true);
					break;
				case 5:
					cb_kyglbtz_szz_3.setChecked(true);
					break;
				}
			}
		}
		if(oc3.getOnch_anus()>0){
			switch(oc3.getOnch_anus()){
			case 1:
				rg_gm_3.check(0);
				rb_gm_no_3.setChecked(true);
				break;
			case 2:
				rg_gm_3.check(1);
				rb_gm_yes_3.setChecked(true);
				break;
			}
		}
		if(oc3.getOnch_sanguine()>0){
			et_xhdb_3.setText(oc3.getOnch_sanguine()+"");
		}
		if(oc3.getOnch_activity()>0){
			et_hwhd_3.setText(oc3.getOnch_activity()+"");
		}
		if(oc3.getOnch_vd()>0){
			et_vd_3.setText(oc3.getOnch_vd()+"");
		}
		if(oc3.getOnch_deve_asse()>0){
			switch(oc3.getOnch_deve_asse()){
			case 1:
				rg_fypg_3.check(0);
				rb_fypg_pass_3.setChecked(true);
				break;
			case 2:
				rg_fypg_3.check(1);
				rb_fypg_nopass_3.setChecked(true);
				break;
			}
		}
		if(oc3.getOnch_deases()>0){
			switch(oc3.getOnch_deases()){
			case 1:
				rg_disease_3.check(0);
				rb_disease_no_3.setChecked(true);
				break;
			case 2:
				rg_disease_3.check(1);
				rb_disease_yes_3.setChecked(true);
				break;
			}
		}
		et_other_3.setText(oc3.getOnch_other());
		if(oc3.getOnch_refe_choi()>0){
			switch(oc3.getOnch_refe_choi()){
			case 1:
				rg_zz_3.check(0);
				rb_zz_no_3.setChecked(true);
				break;
			case 2:
				rg_zz_3.check(1);
				rb_zz_yes_3.setChecked(true);
				et_zz_reason_3.setText(oc3.getOnch_refe_reasion());
				et_zz_inst_3.setText(oc3.getOnch_refe_inst());
				break;
			}
		}
		if(oc3.getOnch_guide()!=null&&oc3.getOnch_guide().length()>0){
			String s[]=oc3.getOnch_guide().split(",");
			for(int i=0;i<s.length;i++){
				switch(Integer.parseInt(s[i])){
				case 1:
					cb_guide_1_3.setChecked(true);
					break;
				case 2:
					cb_guide_2_3.setChecked(true);
					break;
				case 3:
					cb_guide_3_3.setChecked(true);
					break;
				case 4:
					cb_guide_4_3.setChecked(true);
					break;
				case 5:
					cb_guide_5_3.setChecked(true);
					break;
				}
			}
		}
		et_nextdate_3.setText(oc3.getOnch_next_date());
		et_doctor_3.setText(oc3.getOnch_doctor());
		//8月龄
		//oc.selectOneChild(profileid, 4);
		if(oc4.getOnch_stoop_symp()!=null&&oc4.getOnch_stoop_symp().length()>0){
			String s[]=oc4.getOnch_stoop_symp().split(",");
			for(int i=0;i<s.length;i++){
				switch(Integer.parseInt(s[i])){
				case 1:
					rb_kyllbzz_no_4.setChecked(true);
					break;
				case 2:
					rb_kyllbzz_yejing_4.setChecked(true);
					break;
				case 3:
					rb_kyllbzz_duohan_4.setChecked(true);
					break;
				case 4:
					rb_kyllbzz_fanzao_4.setChecked(true);
					break;
				}
			}
		}
		if(oc4.getOnch_stoop_sign()!=null&&oc4.getOnch_stoop_sign().length()>0){
			String s[]=oc4.getOnch_stoop_sign().split(",");
			for(int i=0;i<s.length;i++){
				switch(Integer.parseInt(s[i])){
				case 1:
					cb_kyglbtz_lcz_4.setChecked(true);
					break;
				case 2:
					cb_kyglbtz_lwf_4.setChecked(true);
					break;
				case 3:
					cb_kyglbtz_lrgg_4.setChecked(true);
					break;
				case 4:
					cb_kyglbtz_jx_4.setChecked(true);
					break;
				case 5:
					cb_kyglbtz_szz_4.setChecked(true);
					break;
				}
			}
		}
		if(oc4.getOnch_anus()>0){
			switch(oc4.getOnch_anus()){
			case 1:
				rg_gm_4.check(0);
				rb_gm_no_4.setChecked(true);
				break;
			case 2:
				rg_gm_4.check(1);
				rb_gm_yes_4.setChecked(true);
				break;
			}
		}
		if(oc4.getOnch_sanguine()>0){
			et_xhdb_4.setText(oc4.getOnch_sanguine()+"");
		}
		if(oc4.getOnch_activity()>0){
			et_hwhd_4.setText(oc4.getOnch_activity()+"");
		}
		if(oc4.getOnch_vd()>0){
			et_vd_4.setText(oc4.getOnch_vd()+"");
		}
		if(oc4.getOnch_deve_asse()>0){
			switch(oc4.getOnch_deve_asse()){
			case 1:
				rg_fypg_4.check(0);
				rb_fypg_pass_4.setChecked(true);
				break;
			case 2:
				rg_fypg_4.check(1);
				rb_fypg_nopass_4.setChecked(true);
				break;
			}
		}
		if(oc4.getOnch_deases()>0){
			switch(oc4.getOnch_deases()){
			case 1:
				rg_disease_4.check(0);
				rb_disease_no_4.setChecked(true);
				break;
			case 2:
				rg_disease_4.check(1);
				rb_disease_yes_4.setChecked(true);
				break;
			}
		}
		et_other_4.setText(oc4.getOnch_other());
		if(oc4.getOnch_refe_choi()>0){
			switch(oc4.getOnch_refe_choi()){
			case 1:
				rg_zz_4.check(0);
				rb_zz_no_4.setChecked(true);
				break;
			case 2:
				rg_zz_4.check(1);
				rb_zz_yes_4.setChecked(true);
				et_zz_reason_4.setText(oc4.getOnch_refe_reasion());
				et_zz_inst_4.setText(oc4.getOnch_refe_inst());
				break;
			}
		}
		if(oc4.getOnch_guide()!=null&&oc4.getOnch_guide().length()>0){
			String s[]=oc4.getOnch_guide().split(",");
			for(int i=0;i<s.length;i++){
				switch(Integer.parseInt(s[i])){
				case 1:
					cb_guide_1_4.setChecked(true);
					break;
				case 2:
					cb_guide_2_4.setChecked(true);
					break;
				case 3:
					cb_guide_3_4.setChecked(true);
					break;
				case 4:
					cb_guide_4_4.setChecked(true);
					break;
				case 5:
					cb_guide_5_4.setChecked(true);
					break;
				}
			}
		}
		et_nextdate_4.setText(oc4.getOnch_next_date());
		et_doctor_4.setText(oc4.getOnch_doctor());
	}
	
	/**
	 * @return返回true则保存成功，false则保存失败
	 * 该函数将本界面中个控件的值保存到数据库中
	 */
	public boolean saveView(){
		
		if(et_xhdb_1.getText().toString().replaceAll("\\s", "").length()>10||
				et_xhdb_1.getText().toString().replaceAll("\\s", "").startsWith("-")){
			et_xhdb_1.setError("数据长度超过范围");
			return false;
		}
		if(et_xhdb_2.getText().toString().replaceAll("\\s", "").length()>10||
				et_xhdb_2.getText().toString().replaceAll("\\s", "").startsWith("-")){
			et_xhdb_2.setError("数据长度超过范围");
			return false;
		}
		if(et_xhdb_3.getText().toString().replaceAll("\\s", "").length()>10||
				et_xhdb_3.getText().toString().replaceAll("\\s", "").startsWith("-")){
			et_xhdb_3.setError("数据长度超过范围");
			return false;
		}
		if(et_xhdb_4.getText().toString().replaceAll("\\s", "").length()>10||
				et_xhdb_4.getText().toString().replaceAll("\\s", "").startsWith("-")){
			et_xhdb_4.setError("数据长度超过范围");
			return false;
		}
		if(et_hwhd_1.getText().toString().replaceAll("\\s", "").length()>10||
				et_hwhd_1.getText().toString().replaceAll("\\s", "").startsWith("-")){
			et_hwhd_1.setError("数据长度超过范围");
			return false;
		}
		if(et_hwhd_2.getText().toString().replaceAll("\\s", "").length()>10||
				et_hwhd_2.getText().toString().replaceAll("\\s", "").startsWith("-")){
			et_hwhd_2.setError("数据长度超过范围");
			return false;
		}
		if(et_hwhd_3.getText().toString().replaceAll("\\s", "").length()>10||
				et_hwhd_3.getText().toString().replaceAll("\\s", "").startsWith("-")){
			et_hwhd_3.setError("数据长度超过范围");
			return false;
		}
		if(et_hwhd_4.getText().toString().replaceAll("\\s", "").length()>10||
				et_hwhd_4.getText().toString().replaceAll("\\s", "").startsWith("-")){
			et_hwhd_4.setError("数据长度超过范围");
			return false;
		}
		if(et_vd_1.getText().toString().replaceAll("\\s", "").length()>10||
				et_vd_1.getText().toString().replaceAll("\\s", "").startsWith("-")){
			et_vd_1.setError("数据长度超过范围");
			return false;
		}
		if(et_vd_2.getText().toString().replaceAll("\\s", "").length()>10||
				et_vd_2.getText().toString().replaceAll("\\s", "").startsWith("-")){
			et_vd_2.setError("数据长度超过范围");
			return false;
		}
		if(et_vd_3.getText().toString().replaceAll("\\s", "").length()>10||
				et_vd_3.getText().toString().replaceAll("\\s", "").startsWith("-")){
			et_vd_3.setError("数据长度超过范围");
			return false;
		}
		if(et_vd_4.getText().toString().replaceAll("\\s", "").length()>10||
				et_vd_4.getText().toString().replaceAll("\\s", "").startsWith("-")){
			et_vd_4.setError("数据长度超过范围");
			return false;
		}
		OneChild oc=new OneChild(myContext);
		oc.selectOneChild(profileid, 1);
		String s="";
		if(rb_kyllbtz_no_1.isChecked()){
			s+="1,";
		}
		if(rb_kyllbtz_lgrh_1.isChecked()){
			s+="2,";
		}
		if(rb_kyllbtz_fl_1.isChecked()){
			s+="3,";
		}
		if(rb_kyllbtz_zt_1.isChecked()){
			s+="4";
		}
		oc.setOnch_stoop_sign(s);
		if(et_xhdb_1.getText().toString().replaceAll("\\s", "").length()>0){
			oc.setOnch_sanguine(Float.parseFloat(et_xhdb_1.getText().toString().replaceAll("\\s", "")));
		}
		if(et_hwhd_1.getText().toString().replaceAll("\\s", "").length()>0){
			oc.setOnch_activity(Float.parseFloat(et_hwhd_1.getText().toString().replaceAll("\\s", "")));
		}
		if(et_vd_1.getText().toString().replaceAll("\\s", "").length()>0){
			oc.setOnch_vd(Float.parseFloat(et_vd_1.getText().toString().replaceAll("\\s", "")));
		}
		if(rb_gm_no_1.isChecked()){
			oc.setOnch_anus(1);
		}
		else if(rb_gm_yes_1.isChecked()){
			oc.setOnch_anus(2);
		}
		if(rb_fypg_pass_1.isChecked()){
			oc.setOnch_deve_asse(1);
		}
		else if(rb_fypg_nopass_1.isChecked()){
			oc.setOnch_deve_asse(2);
		}
		if(rb_disease_no_1.isChecked()){
			oc.setOnch_deases(1);
		}
		else if(rb_disease_yes_1.isChecked()){
			oc.setOnch_deases(2);
		}
		oc.setOnch_other(et_other_1.getText().toString());
		if(rb_zz_no_1.isChecked()){
			oc.setOnch_refe_choi(1);
		}
		else if(rb_zz_yes_1.isChecked()){
			oc.setOnch_refe_choi(2);
			oc.setOnch_refe_reasion(et_zz_reason_1.getText().toString().replaceAll("\\s", ""));
			oc.setOnch_refe_inst(et_zz_inst_1.getText().toString().replaceAll("\\s", ""));
		}
		s="";
		if(cb_guide_1_1.isChecked()){
			s+="1,";
		}
		if(cb_guide_2_1.isChecked()){
			s+="2,";
		}
		if(cb_guide_3_1.isChecked()){
			s+="3,";
		}
		if(cb_guide_4_1.isChecked()){
			s+="4,";
		}
		if(cb_guide_5_1.isChecked()){
			s+="5";
		}
		oc.setOnch_guide(s);
		oc.setOnch_next_date(et_nextdate_1.getText().toString().replaceAll("\\s", ""));
		oc.setOnch_doctor(et_doctor_1.getText().toString().replaceAll("\\s", ""));
		oc.updateOneChild(profileid, 1);
		//3
		oc.selectOneChild(profileid, 2);
		s="";
		if(rb_kyllbzz_no_2.isChecked()){
			s+="1,";
		}
		if(rb_kyllbzz_yejing_2.isChecked()){
			s+="2,";
		}
		if(rb_kyllbzz_duohan_2.isChecked()){
			s+="3,";
		}
		if(rb_kyllbzz_fanzao_2.isChecked()){
			s+="4";
		}
		oc.setOnch_stoop_symp(s);
		s="";
		if(rb_kyllbtz_no_2.isChecked()){
			s+="1,";
		}
		if(rb_kyllbtz_lgrh_2.isChecked()){
			s+="2,";
		}
		if(rb_kyllbtz_fl_2.isChecked()){
			s+="3,";
		}
		if(rb_kyllbtz_zt_2.isChecked()){
			s+="4";
		}
		oc.setOnch_stoop_sign(s);
		if(rb_gm_no_2.isChecked()){
			oc.setOnch_anus(1);
		}
		else if(rb_gm_yes_2.isChecked()){
			oc.setOnch_anus(2);
		}
		if(et_xhdb_2.getText().toString().replaceAll("\\s", "").length()>0){
			oc.setOnch_sanguine(Float.parseFloat(et_xhdb_2.getText().toString().replaceAll("\\s", "")));
		}
		if(et_hwhd_2.getText().toString().replaceAll("\\s", "").length()>0){
			oc.setOnch_activity(Float.parseFloat(et_hwhd_2.getText().toString().replaceAll("\\s", "")));
		}
		if(et_vd_2.getText().toString().replaceAll("\\s", "").length()>0){
			oc.setOnch_vd(Float.parseFloat(et_vd_2.getText().toString().replaceAll("\\s", "")));
		}
		if(rb_fypg_pass_2.isChecked()){
			oc.setOnch_deve_asse(1);
		}
		else if(rb_fypg_nopass_2.isChecked()){
			oc.setOnch_deve_asse(2);
		}
		if(rb_disease_no_2.isChecked()){
			oc.setOnch_deases(1);
		}
		else if(rb_disease_yes_2.isChecked()){
			oc.setOnch_deases(2);
		}
		oc.setOnch_other(et_other_2.getText().toString());
		if(rb_zz_no_2.isChecked()){
			oc.setOnch_refe_choi(1);
		}
		else if(rb_zz_yes_2.isChecked()){
			oc.setOnch_refe_choi(2);
			oc.setOnch_refe_reasion(et_zz_reason_2.getText().toString().replaceAll("\\s", ""));
			oc.setOnch_refe_inst(et_zz_inst_2.getText().toString().replaceAll("\\s", ""));
		}
		s="";
		if(cb_guide_1_2.isChecked()){
			s+="1,";
		}
		if(cb_guide_2_2.isChecked()){
			s+="2,";
		}
		if(cb_guide_3_2.isChecked()){
			s+="3,";
		}
		if(cb_guide_4_2.isChecked()){
			s+="4,";
		}
		if(cb_guide_5_2.isChecked()){
			s+="5";
		}
		oc.setOnch_guide(s);
		oc.setOnch_next_date(et_nextdate_2.getText().toString().replaceAll("\\s", ""));
		oc.setOnch_doctor(et_doctor_2.getText().toString().replaceAll("\\s", ""));
		oc.updateOneChild(profileid, 2);
		//6
		oc.selectOneChild(profileid, 3);
		s="";
		if(rb_kyllbzz_no_3.isChecked()){
			s+="1,";
		}
		if(rb_kyllbzz_yejing_3.isChecked()){
			s+="2,";
		}
		if(rb_kyllbzz_duohan_3.isChecked()){
			s+="3,";
		}
		if(rb_kyllbzz_fanzao_3.isChecked()){
			s+="4";
		}
		oc.setOnch_stoop_symp(s);
		s="";
		if(cb_kyglbtz_lcz_3.isChecked()){
			s+="1,";
		}
		if(cb_kyglbtz_lwf_3.isChecked()){
			s+="2,";
		}
		if(cb_kyglbtz_lrgg_3.isChecked()){
			s+="3,";
		}
		if(cb_kyglbtz_jx_3.isChecked()){
			s+="4,";
		}
		if(cb_kyglbtz_szz_3.isChecked()){
			s+="5";
		}
		oc.setOnch_stoop_sign(s);
		if(rb_gm_no_3.isChecked()){
			oc.setOnch_anus(1);
		}
		else if(rb_gm_yes_3.isChecked()){
			oc.setOnch_anus(2);
		}
		if(et_xhdb_3.getText().toString().replaceAll("\\s", "").length()>0){
			oc.setOnch_sanguine(Float.parseFloat(et_xhdb_3.getText().toString().replaceAll("\\s", "")));
		}
		if(et_hwhd_3.getText().toString().replaceAll("\\s", "").length()>0){
			oc.setOnch_activity(Float.parseFloat(et_hwhd_3.getText().toString().replaceAll("\\s", "")));
		}
		if(et_vd_3.getText().toString().replaceAll("\\s", "").length()>0){
			oc.setOnch_vd(Float.parseFloat(et_vd_3.getText().toString().replaceAll("\\s", "")));
		}
		if(rb_fypg_pass_3.isChecked()){
			oc.setOnch_deve_asse(1);
		}
		else if(rb_fypg_nopass_3.isChecked()){
			oc.setOnch_deve_asse(2);
		}
		if(rb_disease_no_3.isChecked()){
			oc.setOnch_deases(1);
		}
		else if(rb_disease_yes_3.isChecked()){
			oc.setOnch_deases(2);
		}
		oc.setOnch_other(et_other_3.getText().toString());
		if(rb_zz_no_3.isChecked()){
			oc.setOnch_refe_choi(1);
		}
		else if(rb_zz_yes_3.isChecked()){
			oc.setOnch_refe_choi(2);
			oc.setOnch_refe_reasion(et_zz_reason_3.getText().toString().replaceAll("\\s", ""));
			oc.setOnch_refe_inst(et_zz_inst_3.getText().toString().replaceAll("\\s", ""));
		}
		s="";
		if(cb_guide_1_3.isChecked()){
			s+="1,";
		}
		if(cb_guide_2_3.isChecked()){
			s+="2,";
		}
		if(cb_guide_3_3.isChecked()){
			s+="3,";
		}
		if(cb_guide_4_3.isChecked()){
			s+="4,";
		}
		if(cb_guide_5_3.isChecked()){
			s+="5";
		}
		oc.setOnch_guide(s);
		oc.setOnch_next_date(et_nextdate_3.getText().toString().replaceAll("\\s", ""));
		oc.setOnch_doctor(et_doctor_3.getText().toString().replaceAll("\\s", ""));
		oc.updateOneChild(profileid, 3);
		//8
		oc.selectOneChild(profileid, 4);
		s="";
		if(rb_kyllbzz_no_4.isChecked()){
			s+="1,";
		}
		if(rb_kyllbzz_yejing_4.isChecked()){
			s+="2,";
		}
		if(rb_kyllbzz_duohan_4.isChecked()){
			s+="3,";
		}
		if(rb_kyllbzz_fanzao_4.isChecked()){
			s+="4";
		}
		oc.setOnch_stoop_symp(s);
		s="";
		if(cb_kyglbtz_lcz_4.isChecked()){
			s+="1,";
		}
		if(cb_kyglbtz_lwf_4.isChecked()){
			s+="2,";
		}
		if(cb_kyglbtz_lrgg_4.isChecked()){
			s+="3,";
		}
		if(cb_kyglbtz_jx_4.isChecked()){
			s+="4,";
		}
		if(cb_kyglbtz_szz_4.isChecked()){
			s+="5";
		}
		oc.setOnch_stoop_sign(s);
		if(rb_gm_no_4.isChecked()){
			oc.setOnch_anus(1);
		}
		else if(rb_gm_yes_4.isChecked()){
			oc.setOnch_anus(2);
		}
		if(et_xhdb_4.getText().toString().replaceAll("\\s", "").length()>0){
			oc.setOnch_sanguine(Float.parseFloat(et_xhdb_4.getText().toString().replaceAll("\\s", "")));
		}
		if(et_hwhd_4.getText().toString().replaceAll("\\s", "").length()>0){
			oc.setOnch_activity(Float.parseFloat(et_hwhd_4.getText().toString().replaceAll("\\s", "")));
		}
		if(et_vd_4.getText().toString().replaceAll("\\s", "").length()>0){
			oc.setOnch_vd(Float.parseFloat(et_vd_4.getText().toString().replaceAll("\\s", "")));
		}
		if(rb_fypg_pass_4.isChecked()){
			oc.setOnch_deve_asse(1);
		}
		else if(rb_fypg_nopass_4.isChecked()){
			oc.setOnch_deve_asse(2);
		}
		if(rb_disease_no_4.isChecked()){
			oc.setOnch_deases(1);
		}
		else if(rb_disease_yes_4.isChecked()){
			oc.setOnch_deases(2);
		}
		oc.setOnch_other(et_other_4.getText().toString());
		if(rb_zz_no_4.isChecked()){
			oc.setOnch_refe_choi(1);
		}
		else if(rb_zz_yes_4.isChecked()){
			oc.setOnch_refe_choi(2);
			oc.setOnch_refe_reasion(et_zz_reason_4.getText().toString().replaceAll("\\s", ""));
			oc.setOnch_refe_inst(et_zz_inst_4.getText().toString().replaceAll("\\s", ""));
		}
		s="";
		if(cb_guide_1_4.isChecked()){
			s+="1,";
		}
		if(cb_guide_2_4.isChecked()){
			s+="2,";
		}
		if(cb_guide_3_4.isChecked()){
			s+="3,";
		}
		if(cb_guide_4_4.isChecked()){
			s+="4,";
		}
		if(cb_guide_5_4.isChecked()){
			s+="5";
		}
		oc.setOnch_guide(s);
		oc.setOnch_next_date(et_nextdate_4.getText().toString().replaceAll("\\s", ""));
		oc.setOnch_doctor(et_doctor_4.getText().toString().replaceAll("\\s", ""));
		oc.updateOneChild(profileid, 4);
		
		return true;
	}
	
	class MyView extends View {
    	View v;
    	Paint paint;
    	
		public MyView(Context context) {
			super(context);
			paint=new Paint();
			paint.setStyle(Paint.Style.STROKE);
            paint.setColor(Color.BLACK);
		}
		
		@Override
		public void onDraw(Canvas c){
	        int top=ll1.getTop();
	        int left=ll1.getLeft()-15;
	        int right=ll1.getRight()+15;
	        int bottom=ll1.getBottom();
	        int y=0;//sv.getScrollY();
	        int height=rb_gm_no_2.getHeight();
	        int height2=et_xhdb_2.getHeight();
	        top=top-y-40;
	        bottom=bottom-y;
	        
	        c.drawLine(left, top+122, right, top+122, paint);
	        c.drawLine(left+35, top+132+1*30+2*height, right, top+132+1*30+2*height, paint);
	        c.drawLine(left+35, top+155+2*30+5*height, right, top+155+2*30+5*height, paint);
	        c.drawLine(left+35, top+155+3*30+7*height, right, top+155+3*30+7*height, paint);
	        c.drawLine(left, top+155+4*30+7*height+height2*1, right, top+155+4*30+7*height+height2*1, paint);
	        c.drawLine(left, top+155+5*30+7*height+height2*2, right, top+155+5*30+7*height+height2*2, paint);
	        c.drawLine(left, top+155+6*30+7*height+height2*3, right, top+155+6*30+7*height+height2*3, paint);
	        c.drawLine(left, top+155+7*30+8*height+height2*3, right, top+155+7*30+8*height+height2*3, paint);
	        c.drawLine(left, top+155+8*30+10*height+height2*3, right, top+155+8*30+10*height+height2*3, paint);
	        c.drawLine(left, top+155+9*30+10*height+height2*4, right, top+155+9*30+10*height+height2*4, paint);
	        c.drawLine(left, top+165+10*30+12*height+height2*6, right, top+165+10*30+12*height+height2*6, paint);
	        c.drawLine(left, top+180+11*30+17*height+height2*6, right, top+180+11*30+17*height+height2*6, paint);
	        c.drawLine(left, top+180+12*30+17*height+height2*7, right, top+180+12*30+17*height+height2*7, paint);
	        c.drawLine(left, top+180+13*30+17*height+height2*8, right, top+180+13*30+17*height+height2*8, paint);
	        
	        
	        c.drawLine(left, top+122, left, top+180+13*30+17*height+height2*8, paint);
	        c.drawLine(right, top+122, right, top+180+13*30+17*height+height2*8, paint);
	        c.drawLine(left+35, top+122, left+35, top+155+4*30+7*height+height2*1, paint);
	        
	        c.drawLine(left+115, top+122, left+115, top+180+13*30+17*height+height2*8, paint);
	        c.drawLine(left+275, top+122, left+275, top+180+13*30+17*height+height2*8, paint);
	        c.drawLine(left+435, top+122, left+435, top+180+13*30+17*height+height2*8, paint);
	        c.drawLine(left+595, top+122, left+595, top+180+13*30+17*height+height2*8, paint);
	        	        
		}
    	
    }

	@Override
	public void onClick(View v) {
		// TODO Auto-generated method stub
		if(v==et_nextdate_1){
			mPopupWindow = new MyPopupWindow(myContext);			
			mPopupWindow.showAtLocation(v.findViewById(R.id.et_sc_nextdate_1), Gravity.CENTER, 0, 0);

			Button btn=mPopupWindow.getButton();
			btn.setOnClickListener(new OnClickListener(){

				@Override
				public void onClick(View v) {
					// TODO Auto-generated method stub
					et_nextdate_1.setText(mPopupWindow.getDate());
					mPopupWindow.dismiss();
				}
				
			});
		}
		else if(v==et_nextdate_2){
			mPopupWindow = new MyPopupWindow(myContext);			
			mPopupWindow.showAtLocation(v.findViewById(R.id.et_sc_nextdate_2), Gravity.CENTER, 0, 0);

			Button btn=mPopupWindow.getButton();
			btn.setOnClickListener(new OnClickListener(){

				@Override
				public void onClick(View v) {
					// TODO Auto-generated method stub
					et_nextdate_2.setText(mPopupWindow.getDate());
					mPopupWindow.dismiss();
				}
				
			});
		}
		else if(v==et_nextdate_3){
			mPopupWindow = new MyPopupWindow(myContext);			
			mPopupWindow.showAtLocation(v.findViewById(R.id.et_sc_nextdate_3), Gravity.CENTER, 0, 0);

			Button btn=mPopupWindow.getButton();
			btn.setOnClickListener(new OnClickListener(){

				@Override
				public void onClick(View v) {
					// TODO Auto-generated method stub
					et_nextdate_3.setText(mPopupWindow.getDate());
					mPopupWindow.dismiss();
				}
				
			});
		}
		else if(v==et_nextdate_4){
			mPopupWindow = new MyPopupWindow(myContext);			
			mPopupWindow.showAtLocation(v.findViewById(R.id.et_sc_nextdate_4), Gravity.CENTER, 0, 0);

			Button btn=mPopupWindow.getButton();
			btn.setOnClickListener(new OnClickListener(){

				@Override
				public void onClick(View v) {
					// TODO Auto-generated method stub
					et_nextdate_4.setText(mPopupWindow.getDate());
					mPopupWindow.dismiss();
				}
				
			});
		}
	}

	@Override
	public void onFocusChange(View v, boolean hasFocus) {
		// TODO Auto-generated method stub
		if(v==et_nextdate_1&&hasFocus){
			mPopupWindow = new MyPopupWindow(getContext());			
			mPopupWindow.showAtLocation(v.findViewById(R.id.et_sc_nextdate_1  ), Gravity.CENTER, 0, 0);

			Button btn=mPopupWindow.getButton();
			btn.setOnClickListener(new OnClickListener(){

				@Override
				public void onClick(View v) {
					// TODO Auto-generated method stub
					et_nextdate_1.setText(mPopupWindow.getDate());
					mPopupWindow.dismiss();
				}
				
			});
		}
		else if(v==et_nextdate_2&&hasFocus){
			mPopupWindow = new MyPopupWindow(getContext());			
			mPopupWindow.showAtLocation(v.findViewById(R.id.et_sc_nextdate_2 ), Gravity.CENTER, 0, 0);

			Button btn=mPopupWindow.getButton();
			btn.setOnClickListener(new OnClickListener(){

				@Override
				public void onClick(View v) {
					// TODO Auto-generated method stub
					et_nextdate_2.setText(mPopupWindow.getDate());
					mPopupWindow.dismiss();
				}
				
			});
		}
		else if(v==et_nextdate_3&&hasFocus){
			mPopupWindow = new MyPopupWindow(getContext());			
			mPopupWindow.showAtLocation(v.findViewById(R.id.et_sc_nextdate_3  ), Gravity.CENTER, 0, 0);

			Button btn=mPopupWindow.getButton();
			btn.setOnClickListener(new OnClickListener(){

				@Override
				public void onClick(View v) {
					// TODO Auto-generated method stub
					et_nextdate_3.setText(mPopupWindow.getDate());
					mPopupWindow.dismiss();
				}
				
			});
		}
		else if(v==et_nextdate_3&&hasFocus){
			mPopupWindow = new MyPopupWindow(getContext());			
			mPopupWindow.showAtLocation(v.findViewById(R.id.et_sc_nextdate_4  ), Gravity.CENTER, 0, 0);

			Button btn=mPopupWindow.getButton();
			btn.setOnClickListener(new OnClickListener(){

				@Override
				public void onClick(View v) {
					// TODO Auto-generated method stub
					et_nextdate_3.setText(mPopupWindow.getDate());
					mPopupWindow.dismiss();
				}
				
			});
		}
	
	}
}
